home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / ROADS15.ARJ / FX.H < prev    next >
C/C++ Source or Header  |  1993-12-19  |  1KB  |  33 lines

  1. #ifndef __MEM_H
  2. #include <mem.h>
  3. #endif
  4.  
  5. /* DEFINITIONS */
  6. #define VCOLORS     256         /* Number of screen colors */
  7.  
  8. /* GLOBAL VARIABLES */
  9. #ifdef FX_C
  10. char default_palette[VCOLORS*3]; /* Stores the palette before fades */
  11. char empty_palette[VCOLORS*3];   /* Stores an empty palette for quick clearing */
  12. char abortfadeonkeyhit=0;        /* Quit fading on keyhit? */
  13. char animatewhilefading=1;       /* Animate screen while performing fade? */
  14. #else
  15. extern char default_palette[VCOLORS*3];
  16. extern char empty_palette[VCOLORS*3];
  17. extern char abortfadeonkeyhit;
  18. extern char animatewhilefading;
  19. #endif
  20.  
  21. /* PROTOTYPES */
  22. void fade_in (int DACstart, int DACend);
  23. void fade_out (int DACstart, int DACend);
  24.  
  25. /* MACROS */
  26. #define fade_init()     fg_getdacs (0, VCOLORS, default_palette); /* COPY PALETTE */
  27. #define fade_blackout() memset (empty_palette, 0, VCOLORS*3);\
  28.                         fg_setdacs(0, VCOLORS, empty_palette);    /* SET DACS TO ZERO */
  29.  
  30. #define fade_out_all() fade_out(0,255)
  31. #define fade_in_all()  fade_in(0,255)
  32.  
  33.